public struct Int32{
    public const int MaxValue = 0x7ffffff;
}
public struct Color{
    public static readonly Color Red = new Color(0x0000ff);
}
可變的Type不要宣告為readonly
例如,陣列欄位不要宣告為readonly,錯誤範例如下
public class SomeType{
    public static readonly int[] Numbers = new int[10];
}
以這個範例而言,Numbers雖然是readonly
但是Numbers裡面的元素卻是可以改變的,就像下列方式
SomeType.Numbers[5] = 10;
對使用者而言這就不算是readonly
所以陣列...等可變動的欄位不要宣告為readonly
不是readonly或static的一般欄位,不要宣告public 或 protected
不要讓外面的程式可以改變field的值
如果需要改變的話,考慮使用properties
public struct Point{
    private int x;
    private int y;
    
    public Point(int x, int y){
        this.x = x;
        this.y = y;
    }
    
    public int X{
        get{ return x;}
    }
    
   public int Y{
        get{ return y;}
    }
}